package com.cw1.factory.absFactory.order;

import com.cw1.factory.absFactory.pizza.LdChessPizza;
import com.cw1.factory.absFactory.pizza.LdPepperPizza;
import com.cw1.factory.absFactory.pizza.Pizza;
import com.cw1.factory.constant.PizzaConstant;

/**
 * @Author qiuMi
 * @description 披萨 - 伦敦 - 工厂
 * @Date 2022-10-07 20:46
 **/
public class LdFactory implements AbsFactory{
    @Override
    public Pizza createPizza(String orderType) {
        Pizza pizza = null;
        if (orderType.equals(PizzaConstant.PEPPER)){
            pizza = new LdPepperPizza();
        }else if (orderType.equals(PizzaConstant.CHESS)){
            pizza = new LdChessPizza();
        }
        return pizza;
    }
}
